//
//  BookShelfCell.m
//  FunRead
//
//  Created by dllo on 15/5/25.
//  Copyright (c) 2015年 华东伟. All rights reserved.
//

#import "BookShelfCell.h"

#import <UIImageView+WebCache.h>
@implementation BookShelfCell

- (void)dealloc
{
    [_image release];
    [_nameLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if ( self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        // 建图片和小说名文本框
        self.image = [[UIImageView alloc]initWithFrame:CGRectMake(10, 5, 50, 60)];
        [self addSubview:self.image];
     
        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(80, 5, 200, 60)];
        self.nameLabel.font = [UIFont systemFontOfSize:18];
        self.nameLabel.textColor = [UIColor grayColor];
        [self addSubview:self.nameLabel];
        
    }
    return self;
}


- (void)ViewWithData:(NSDictionary *)dic
{
    
    [self.image sd_setImageWithURL:[dic objectForKey:@"imageUrl"] placeholderImage:[UIImage imageNamed:@"loading.gif"]];
    self.nameLabel.text = [dic objectForKey:@"bookName"];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
